package com.syl.mapper;

import com.syl.entity.Stu;
import com.syl.entity.StudentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Classname StuMapper
 * @Description
 * @Date 2025/8/15 20:35
 * @Created by SYL
 */

@Mapper
public interface StuMapper {

    Stu findStuByid(int id);

    Stu findStuByidAndName(@Param("id") int id, @Param("name")String name);

    ArrayList<Stu> findAllBtu();

    ArrayList<Stu> findStuNameAndAge(Map<String, Object> map);

    int addStu(Stu stu);

    int updateStu(Stu stu);

    int deleteById(int id);

    int deleteByIds(List<Integer> ids);

    ArrayList<StudentVO> findAllStuByClass();

    StudentVO findStuBySubject(int id);

    StudentVO findStudentAndAllSubjectAndTeacherByStuid(int sid);
}
